package com.example.customview.horizontalview

import android.widget.ArrayAdapter
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseDBFragment
import com.example.customview.R
import com.example.customview.arouter.CustomArouter
import com.example.customview.databinding.FragmentHorizontalBinding

@Route(path = CustomArouter.CUSTOM_HORIZONTAL_FRAGMENT)
class HorizontalFragment : BaseDBFragment<FragmentHorizontalBinding>(R.layout.fragment_horizontal) {
    private var list1: MutableList<String> = mutableListOf()
    private var list2: MutableList<String> = mutableListOf()
    override fun initView() {
       repeat(20){
           list1.add("$it")
       }

        repeat(9){
            list2.add(('A'+it).toString())
        }

        val adapter = ArrayAdapter<String>(requireActivity(),android.R.layout.simple_expandable_list_item_1,list1)
        mBinding.lvOne.adapter = adapter

        val adapter2 = ArrayAdapter<String>(requireActivity(),android.R.layout.simple_expandable_list_item_1,list2)
        mBinding.lvTwo.adapter = adapter2

    }
}